package iO;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.Scanner;

/**
 * @Author: Miyako
 * @Date: 2024-07-17-14:27
 * @Description:
 */
public class SimpleNoteDemo01 {
    static Scanner sc = new Scanner(System.in);
    static Random rand = new Random();
    public static void main(String[] args) throws FileNotFoundException {
        createFile();
        System.out.println("ok");
    }
    static void createFile() throws FileNotFoundException {
        System.out.println("输入你要创建的文件名");
        PrintWriter PW = new PrintWriter(new FileOutputStream(sc.next()),true);
        int a;
        while (true) {
            if ((a=rand.nextInt(10000000))== rand.nextInt(10000000))return;
            PW.println(a);
        }
    }

}
